#:kivy 1.6.0
#:import FittableToggleButton ui.fittable_widgets.FittableToggleButton
#:import FittableButton ui.fittable_widgets.FittableButton
#:import FittableLabel ui.fittable_widgets.FittableLabel

<PlayersOrderWidget>:
    player_list: player_list
    orientation: 'vertical'

    BoxLayout:
        size_hint_y: None
        height: root.height*0.1
        FittableButton:
            color_name: 'green'
            text: _('Start')
            on_release: root.finish()

    FittableLabel:
        id: player_list
        text: _('Players order')
        size_hint_y: 0.2

    ScrollView:
        do_scroll_x: False
        GridLayout:
            cols: 1
            size_hint_y: None
            id: player_list

    FittableButton:
        size_hint_y: 0.3
        text: _('Shuffle')
        on_release: root.shuffle()

<PlayerLabel>:
    font_size: 24

<PlayerLine>:
    orientation: 'horizontal'
    #width: root.width
    size_hint_y: None
    height: root.root.height * 0.1
    FittableButton:
        text: 'Down'
        on_release: root.up_down_pressed(root.index, 1)
        background_color: root.color
        size_hint_x: None
        width: self.height
    FittableToggleButton:
        text: root.player.name
        background_color: root.color
        on_release: root.swap_butt_pressed(root.index, self)
    FittableButton:
        text: 'Up'
        on_release: root.up_down_pressed(root.index, -1)
        background_color: root.color
        size_hint_x: None
        width: self.height
        length: 4
